const fs=require('fs');
let user = { username:"xm1",password:"122234" }
let re=fs.readFileSync('node/persons.json','utf8')
re=JSON.parse(re)
// console.log(typeof re ,re[0].username)
let a=re.some(item=>item.username === user.username && item.password === user.password)
if(a){
    console.log('登陆成功')
}else{
   console.log('登录失败')
}
